<%@page import="com.util.Url"%>
<%@page import="hyl.base.flow.Track"%>
<%@page import="hyl.base.flow.Flow"%>
<%@page import="hyl.ext.base.MySession"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="hyl.core.db.MyDB,java.io.PrintWriter"%>
<%@ page import="java.util.List,java.util.Map,hyl.core.MyFun"%>
<%@ page import="com.servlet.*,com.alibaba.fastjson.*"%>
<%
//添加应用系统的dao
PrintWriter shuchu = response.getWriter();
MySession ss = My.getSession(request, response);
String aname = request.getParameter("aname");
String uphone = request.getParameter("uphone");
String ualias = request.getParameter("ualias");
String url = request.getParameter("url");
url = Url.get_top_domain(url);
String arr = request.getParameter("pic");
String pic = "";
if (arr != null && !arr.isEmpty()) {
	JSONArray list = JSON.parseArray(arr);
	for (int i = 0; i < list.size(); i++) {
		JSONObject jo = list.getJSONObject(i);
		if (jo.get("id").equals("avatar1")) {
	pic = jo.get("path").toString();
		}
	}
}
String flowid = MyFun.getUUID();

Flow model = My.get角色调整流程();
Track trk = model.getTrkInstance(flowid);
model.getLink("申请添加").run(trk);

MyDB cdb = My.getCommitDB1();
String sql = "insert into app(flowid,uid,t0,t1,t2,t3,tm0)values(?,?,?,?,?,?,?)";
Object[] params = { flowid, ss.getUserId(), aname, ualias, uphone, url, pic };
cdb.executeUpdate(sql, params);
cdb.commit();

shuchu.print("success");
%>